package com.site.controller;

import com.common.util.CaptchaUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.Model;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by robin on 2016/12/21.
 * 公共Controller
 */
@Controller
@RequestMapping("public")
public class PublicController {
    @RequestMapping("getVailImg")
    @ResponseBody
    public void getVailImg(HttpServletResponse response) throws ServletException, IOException {
        CaptchaUtil.outputCaptcha(response);
    }

    @RequestMapping("getKinde")
    public String getKinde(Model model){
        return "manage/kindeBox";
    }
}
